package assql
{
	public class SQLTime
	{
		private var hours:int;
		private var minutes:int;
		private var seconds:int;
		private var milliseconds:int;
		
		public function SQLTime(hours:int=0, minutes:int=0, seconds:int=0, milliseconds:int=0)
		{
			this.hours = hours;
			this.minutes = minutes;
			this.seconds = seconds;
			this.milliseconds = milliseconds;
		}
		
		public function getDate():Date {
			var dt:Date = new Date(0);
			dt.setHours(hours, minutes, seconds, milliseconds);
			return dt;
		}
		
		public function getTime():Number {
			return getDate().getTime();
		}
		
		public function setTime(hours:int=0, minutes:int=0, seconds:int=0, milliseconds:int=0):void {
			this.hours = hours;
			this.minutes = minutes;
			this.seconds = seconds;
			this.milliseconds = milliseconds;
		}

	}
}